import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
} from 'typeorm';

@Entity({ name: 'user' })
export class UserView {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ length: 50, comment: '用户名', unique: true })
  username: string;

  @Column({ length: 50, comment: '密码' })
  password: string;

  @Column({ length: 20, comment: '昵称', nullable: true })
  nickname: string;

  @Column({ name: 'avatar_url', comment: '头像', nullable: true })
  avatarUrl: string;

  @Column({ comment: '性别', nullable: true })
  gender: number;

  @Column({ comment: '邮箱', nullable: true })
  email: string;

  @Column({ comment: '电话', nullable: true })
  phone: string;

  @Column({ comment: '用户类型', nullable: true })
  type: string;
}
